import { CmdCode, EventCode } from '../../code/index';
import { CmdSignModel, DoctorGrouponModel } from '../../models/index';
import { AHttpCmd } from '../base.cmd';

export class DoctorGrouponGetCmd extends AHttpCmd {
    constructor(private model: DoctorGrouponModel) {
        super();
    }

    req(): CmdSignModel {
        return super.buildCmdSign(this.model);
    }

    resp(data: any): void {
    }

    error(model: CmdSignModel): void {
    }

    returnStruct() {
        return {
            id: "",
            swiperUrl: "",
            title: "",
            distance: "",
            doctorBO: {
                id: "",
                name: "",
                avatarUrl: "",
                titleBO: {
                    value: ""
                },
                departmentBO: {
                    value: ""
                }
            },
            clinicAddressBO: {
                address: "",
                longitude: "",
                latitude: ""
            },
            content: "",
            groupCount: "",
            offeredCount: "",
            price: "",
            joinCount: "",
            startTime: "",
            endTime: "",
            grouponProvince: '',
            grouponCity: '',
            grouponDistrict: '',
        }
    }

    getCmdCode(): string {
        return CmdCode.DOCTOR_GROUPON_GET;
    }
}
